<!--
  @author duanzuocai
  @since 2018/10/19 23:12
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>公司列表</title>
</head>
<body>
<div class="layui-fluid">

    <div class="layui-card">

        <div class="layui-split">&nbsp;</div>

        <form method="post" class="layui-form" id="queryForm" action="/msg/temp/listByGroupId.action" lay-filter="zmn-message-filter">
            <input type="hidden" th:value="${vo.groupId}" name="groupId"/>
            <div class="layui-form" th:include="message/_query :: query "></div>
        </form>

        <div class="layui-card-body">
            <div th:replace="message/_table::table"/>
            <script type="text/html" id="zmn-table-tool">
                <div class="layui-btn-container">
                    <div class="layui-btn-group">
                        <zmn th:if="${#authPermit.checkPermit('/msg/temp/modifyStatus.action')}">
                        <button class="layui-btn layui-btn-sm" lay-event="start">启用</button>
                        <button class="layui-btn layui-btn-sm" lay-event="stop">停用</button>
                        </zmn>
                    </div>
                    <div class="layui-btn-group">
                        <zmn th:if="${#authPermit.checkPermit('/msg/temp/addEdit.action')}">
                        <a th:lay-href="|/msg/temp/detail.action?groupId=${vo.groupId}|" class="layui-btn layui-btn-sm layui-btn-primary" lay-text="新增模板" text="新增模板">+新增</a>
                        </zmn>
                    </div>
                </div>
            </script>
        </div>

    </div>
</div>

<script type="text/javascript" th:inline="javascript">

    var json = {
        hasView: [[${#authPermit.checkPermit('/msg/temp/list.action')}]],
        hasEdit: [[${#authPermit.checkPermit('/msg/temp/detail.action')}]],
        hasUpdateStatus: [[${#authPermit.checkPermit('/msg/temp/updateStatus.action')}]],
        totalCount: [[${vo.totalCount}]],
        pageSize: [[${vo.pageSize}]],
        pageIndex: [[${vo.pageIndex}]],
        items: [[${items}]]
    };

    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        msg_template_list: "message/zmn.msg.template.list",
    }).use(['index', 'msg_template_list']);

</script>
</body>
</html>